-- @owner: z@wan005
-- @date: 2022/3/3
-- @testpoint: year类型作为关键字测试
--step1:查询系统表;expect:year为非保留关键字
set dolphin.b_compatibility_mode=off;
select * from pg_get_keywords() where word ='year';
--step2:作为数据库名;expect:成功
drop database if exists year;
create database year dbcompatibility 'B';
drop database if exists year;
--step3:作为列名和字段的数据类型;expect:成功
drop table if exists year cascade;
create table year(year year);
drop table if exists year cascade;
--step4:作为外部数据源名;expect:成功
drop data source if exists year;
create data source year;
drop data source year;
--step5:作为自定义函数名;expect:成功
create function year(i integer)
returns integer
as $$
begin
    return i+1;
end;
$$ language plpgsql;
/
drop function public.year(i integer);
reset dolphin.b_compatibility_mode;
